getUserAndDeptId().then(res=>{
    self.$$("").cValue = res.lawUserInfo.humanId;
    self.$$("").cValue = res.lawUserInfo.humanId;
})

function getUserAndDeptId() {
    let userInfo = api.USER_INFO();
    let userIdValue = userInfo.id;
    let departmentIdValue = userInfo.departmentId;

    let paramsValue = [{ name: "userId", valueContent: userIdValue }];

    let lawUserInfo = {
        humanId: userIdValue,
        unitId: departmentIdValue
    }
    return new Promise((resolve, reject) => {
        // 获取用户id
        api.DATA_SOURCE_EXECUTE("ds_mod:5d783be5-7e6c-4c0d-9d21-49aaaab06783", "ddcat", paramsValue, [], "").then(res => {
            if(!res.hasError){
                lawUserInfo.humanId = res.result.uid;
                // 获取部门id
                // api.DATA_SOURCE_EXECUTE("b77d9fb7-2e4b-4e6a-9600-f2dc3efa10b9", "ddcat", params, [], "").then(res => {
                //     if(!res.hasError){
                //         lawUserInfo.unitId = res.result.uid;
                //         resolve(lawUserInfo);
                //     }
                // });
            }
        });
    })
}
